package com.jhy.ws.factory;

import com.jhy.core.enums.UserType;
import com.jhy.ws.domain.bo.WsMsgRecordBo;
import com.jhy.ws.strategy.AppSendMsgTemplate;
import com.jhy.ws.strategy.SendMsgTemplate;
import com.jhy.ws.strategy.SysUserSendMsgTemplate;

public class WebsocketTypeFactory {

      public static SendMsgTemplate instance(WsMsgRecordBo bo) {
          SendMsgTemplate template = null;
          switch (bo.getTargetType()){
              case "sys_user":
                  template = new SysUserSendMsgTemplate(bo);
                  break;
              case "app_user":
                  template = new AppSendMsgTemplate(bo);
                  break;
          }
          return template;
      }

}
